package com.sicau.smart_farmer.repository;

import com.sicau.smart_farmer.entity.UserTrainingRecord;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * @author ttxxi
 * @create 2019-11-29 18:55
 */
public interface UserTrainingRecordRepository extends MongoRepository<UserTrainingRecord, String> {

    /**
     * 根据用户的id查询记录
     * @param userId
     * @return
     */
    List<UserTrainingRecord> findByUser_Id(String userId);

    /**
     * 根据培训批次id查询记录
     * @param trainingBatchId
     * @return
     */
    List<UserTrainingRecord> findByTrainingBatch_Id(String trainingBatchId);







}
